package com.qiaofang.applet.service.property.service.impl;

import com.qiaofang.applet.common.base.MongoBaseService;
import com.qiaofang.applet.service.property.domain.EstatePhoto;
import com.qiaofang.applet.service.property.repository.EstatePhotoRepository;
import com.qiaofang.applet.service.property.service.EstateAlbumPhotoService;
import com.qiaofang.applet.service.property.service.EstatePhotoService;
import com.qiaofang.applet.service.property.service.dto.EstateAlbumDto;
import com.qiaofang.applet.service.property.service.dto.EstateAlbumPhotoDto;
import com.qiaofang.applet.service.property.service.dto.EstatePhotoDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Slf4j
@Service
public class EstatePhotoServiceImpl extends MongoBaseService<EstatePhoto, String> implements EstatePhotoService {

    private final EstatePhotoRepository repository;

    @Autowired
    private EstateAlbumPhotoService estateAlbumPhotoService;


    @Autowired
    public EstatePhotoServiceImpl(EstatePhotoRepository repository) {
        super(repository);
        this.repository = repository;
    }


    @Override
    public EstatePhoto findByEstateAndPhotoUuid(String estateUniqueUuid, String photoUuid) {
        return repository.findByEstateUniqueUuidAndPhotoUuid(estateUniqueUuid, photoUuid);
    }
}
